package com.test.group6.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.test.group6.domain.EnterpriseInformation;
import com.test.group6.service.EnterpriseSelectService;

@RestController
@RequestMapping("/Enterprise")
public class EnterpriseSelectController {
	
	@Autowired
	private EnterpriseSelectService enterpriseSelectService;
	
	/**
	 * @author zhang_sguang
	 * @param index 分页展示的页号
	 * @return {@link List<EnterpriseInformation>}
	 */
	@RequestMapping("/queryAllEnterpriseControl")
	public List<EnterpriseInformation> queryAllEnterpriseControl( Integer index){//@PathVariable("index")
		
		List<EnterpriseInformation> list = enterpriseSelectService.queryAllEnterprise(index);
		return list;
	}
	/**
	 * @author zhang_sguang
	 * @param 无参数
	 * @return {@link Integer}
	 */
	@RequestMapping("/queryCount")
	public Integer queryCount() {
		return enterpriseSelectService.queryCount();
	}
}
